#include <iostream>


int Hash(char c)
{
    return c - 'a';
}

int main()
{
    // 找字母异位词的最小步骤
    // eat ate 

    std::string s1 = "zhangsan";
    std::string s2 = "wangwuge";

    int hash1[26] = {0};
    int hash2[26] = {0};

    for(int i = 0;i < s1.size();i++)
    {
        hash1[Hash(s1[i])]++;
        hash2[Hash(s2[i])]++;
    }

    int count = 0;
    for(int i = 0;i < 26;i++)
    {
        if(hash1[i] < hash2[i])
        {
            count += hash2[i] - hash1[i];
        }
    }
    std::cout<<count<<std::endl;

    

    return 0;
}